#include "mainwindow.h"

#include "CircleWidget.h"

MainWindow::MainWindow(QWidget *parent) :
	QMainWindow(parent) {

	ui.setupUi(this);

	pCircelWidget = new CircleWidget();
	setCentralWidget(pCircelWidget);

	setWindowTitle(tr("Circle Demo"));
	statusBar();

	connect(pCircelWidget, SIGNAL(cellXChanged(int)), this,
			SLOT(updateStatus()));
	connect(pCircelWidget, SIGNAL(cellYChanged(int)), this,
			SLOT(updateStatus()));
}

MainWindow::~MainWindow() {

}

void MainWindow::updateStatus() {

	statusBar()->showMessage(
			tr("x = %1, y = %2").arg(pCircelWidget->getCellX()).arg(
					pCircelWidget->getCellY()));
}
